<?php 
/*------------------------------------------------------------------------
# resumes - company resumes management 
# @author    pipapai.com
-------------------------------------------------------------------------*/

defined('_JEXEC') or die;

$thirdaccounts_info = $_['thirdaccounts_info'];
$thirdaccounts_status = $_['thirdaccounts_status'];
$thirdaccount_status_51job = empty($thirdaccounts_status['51job']['fetchresumes']) ? null : $thirdaccounts_status['51job']['fetchresumes'];
$thirdaccount_status_zhilian = empty($thirdaccounts_status['zhilian']['fetchresumes']) ? null : $thirdaccounts_status['zhilian']['fetchresumes'];
$thirdaccount_status_jiancai = empty($thirdaccounts_status['jiancai']['fetchresumes']) ? null : $thirdaccounts_status['jiancai']['fetchresumes'];

?>
<div id="batchimport_dialog_local" class="modal changeinterview_dialog batchimport_dialog popup" style="width:398px; position:fixed; display:none;">
   <div class="topsj"></div>
   <div class="modal-header" style="border-bottom:0px;">
      <button aria-hidden="true" data-dismiss="modal" class="close closediv" type="button">×</button>
      <h3 class="songti">&nbsp;</h3>
   </div>
   <div class="modal-body medium" style="padding:0 20px 20px 20px;">
      <div>
         <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
               <td id="uploadresumeform" valign='top' colspan='2' style="padding:0px;">
                  <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr> 
                     <td valign='top' style="padding:0px;">
                        <div class="muted">上传本地简历，支持最大10M的Doc、Docx、PDF、HTML、HTM、MHT、TXT格式, 可上传单份或压缩后(zip)的多份简历</div>
                     </td>
                  </tr>
                  <tr>
                     <td valign='top' style="padding:0px;">
                        <div class="c_loadactionbox uploadform">
                           <a href="#" class="importlocal"></a>
                           <div class="input_filebox" style="width:152px; height:39px;">
                           <form id="uploadform" class="file_upload" style="width:152px; height:100%;" action="<?php echo OC_Helper::linkToRoute('resume_batchupload');?>" method="POST" enctype="multipart/form-data">
                           <div class="uploadbtn">
                              <input class="inputfile" type="file" name="Filedata" id="Fieldata" data-url=""/>
                              <input type="hidden" name="requesttoken" value="<?php echo PSession::getFormToken();?>" id="requesttoken">
                           </div>
                           </form>
                        </div>
                     </td>
                  </tr>
                  <tr class="uploadbtm">
                     <td colspan='2' style="padding:0px; border-bottom:0px;">
                        <div class="notice clearfix">简历导入进度可在顶部“通知”中查看</div>
                        <div id="uploadresumetable">
                        <table class="files clearfix" width='100%'>
                        <tr class="file_upload_template" style="display:none;">
                           <td width='30%' class="file_name" style="word-break:break-all;"></td>
                           <td class="file_upload_progress" style="padding: 0px 3px"><div style='width:100%;'></div></td>
                           <td align='right' width='15%' class="file_upload_start"><button class="ppp_bluebtn small">上传</button></td>
                           <td align='right' width='15%' class="file_upload_cancel"><button class="btn small">取消</button></td>
                        </tr>
                        </table>
                        </div>
                     </td>
                  </tr>
                  </table>
               </td>
            </tr>
         </table>
      </div>
   </div>
</div>


<div id="batchimport_dialog_offsite" class="modal changeinterview_dialog batchimport_dialog popup" style="width:398px; position:fixed; display:none;">
   <div class="topsj"></div>
   <div class="modal-header" style="border-bottom:0px;">
      <button aria-hidden="true" data-dismiss="modal" class="close closediv" type="button">×</button>
      <h3 class="songti">&nbsp;</h3>
   </div>
   <div class="modal-body medium" style="padding:0 20px 20px 20px;">
      <div>
         <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
               <td style="padding-bottom:0px; padding-top:0px;">
                  <div class="muted" style="margin-bottom:10px;">导入第三方网站人才夹中的所有简历。</div>
                  <div class="importresumes">
                     <div class="synchronous_info">
                        <i class="config_51"></i>&nbsp;前程无忧&nbsp;
                        <?php if(empty($thirdaccount_status_51job) || $thirdaccount_status_51job['result'] != 'syncing'): ?>
                        <?php 
                           list($sync_51job_title, $sync_51job_iclass) = PCompanyHelper::getSyncStatus('importresumes', $thirdaccount_status_51job);
                        ?>
                        <a href="#accountsetdialog_51job" class="em importresume" id="import_51job" data-syncaction='fetchresumes' data-type="51job" title="<?=$sync_51job_title?>">导入简历<i class="<?=$sync_51job_iclass?>"></i></a>
                        <?php else: ?>
                        <a href="javascript:;" class="em synchronous_ing" title="简历导入中，请稍后">导入中...</a>   
                        <?php endif; ?>
                     </div>

                    <div class="synchronous_info" style="margin-left:50px;">
                        <i class="config_zhilian"></i>&nbsp;智联招聘&nbsp;
                        <?php if(empty($thirdaccount_status_zhilian) || $thirdaccount_status_zhilian['result'] != 'syncing'): ?>
                        <?php
                           list($sync_zhilian_title, $sync_zhilian_iclass) = PCompanyHelper::getSyncStatus('importresumes', $thirdaccount_status_zhilian);
                        ?>
                        <a href="#accountsetdialog_zhilian" class="em importresume" id="import_zhilian" data-syncaction='fetchresumes' data-type="zhilian" title="<?=$sync_zhilian_title?>">导入简历<i class="<?=$sync_zhilian_iclass?>"></i></a>
                        <?php else: ?>
                        <a href="javascript:;" class="em synchronous_ing" title="简历导入中，请稍后">导入中...</a>        
                        <?php endif; ?>
                     </div>

                     <div class="synchronous_info">
                        <i class="config_jianzhu"></i>&nbsp;建筑英才&nbsp;
                        <?php if(empty($thirdaccount_status_jiancai) || $thirdaccount_status_jiancai['result'] != 'syncing'): ?>
                        <?php
                           list($sync_jiancai_title, $sync_jiancai_iclass) = PCompanyHelper::getSyncStatus('importresumes', $thirdaccount_status_jiancai);
                        ?>
                        <a href="#accountsetdialog_jiancai" class="em importresume" id="import_jiancai" data-syncaction='fetchresumes' data-type="jiancai" title="<?=$sync_jiancai_title?>">导入简历<i class="<?=$sync_jiancai_iclass?>"></i></a>
                        <?php else: ?>
                        <a href="javascript:;" class="em synchronous_ing" title="简历导入中，请稍后">导入中...</a>
                        <?php endif; ?>
                     </div>
                  </div>
               </td>
            </tr>
         </table>
      </div>
   </div>
</div>

